#include <iostream>
#include <vector>

using namespace std;

bool canJump(vector<int>& nums) {
    int left = 0, right = 0, maxpos = 0;
    while (left <= right)
    {
        if (maxpos >= nums.size() - 1)
            return true;
        for (int i = left; i <= right; ++i)
            maxpos = max(maxpos, nums[i] + i);
        left = right + 1;
        right = maxpos;
    }

    return false;
}

int main()
{

	return 0;
}